<template>
  <cs-container :is-back-to-top="true">
<!--    <cs-edit-table :tableData="tableData"-->
<!--                   :tableHeader="tableHeader"-->
<!--                   @onTableBtn="onTableBtn"-->
<!--                   :disabled="disabled"-->
<!--                   @handleEdit="handleEdit"/>-->
    <cs-tree :treeData="data" :title="title" :isFalseButton="isFalseButton"/>
  </cs-container>
</template>

<script>
// import CsEditTable from '@/components/cs-edit-table'
import CsTree from '@/components/cs-tree'
export default {
  name: 'index1',
  data() {
    return {
      title: '全部策越',
      isFalseButton: true,
      tableData: [
        { depot_name: '2222', no: 'dwdqddw', goods_name: 'e2e2', spec: 'eee', qty: '111', price_text: '111', amount: '12322' },
        { depot_name: '3333333', no: 'dwdqddw', goods_name: 'e2e2', spec: 'eee', qty: '111', price_text: '111', amount: '12322' }
      ],
      tableHeader: [
        { name: 'depot_name', title: '仓库', width: '150', type: 'select', data: [] },
        { name: 'no', title: '商品编号', width: '150', disabled: true, type: 'text' },
        { name: 'goods_name', title: '商品名称', width: '150', disabled: true, type: 'text' },
        { name: 'spec', title: '规格', width: '150', disabled: true },
        { name: 'qty', title: '数量', width: '150' },
        { name: 'price_text', title: '单价', width: '150', disabled: true },
        { name: 'amount', title: '金额', width: '150' },
        { name: 'btn', title: '操作', width: '100', type: 'btn', text: '删除' }
      ],
      disabled: false,
      data: [{
        id: 1,
        label: '一级 1',
        children: [{
          id: 4,
          label: '二级 1-1',
          children: [{
            id: 9,
            label: '三级 1-1-1'
          }, {
            id: 10,
            label: '三级 1-1-2'
          }]
        }]
      }, {
        id: 2,
        label: '一级 2',
        children: [{
          id: 5,
          label: '二级 2-1'
        }, {
          id: 6,
          label: '二级 2-2'
        }]
      }, {
        id: 3,
        label: '一级 3',
        children: [{
          id: 7,
          label: '二级 3-1'
        }, {
          id: 8,
          label: '二级 3-2'
        }]
      }]
    }
  },
  components: {
    // CsEditTable,
    CsTree
  },
  methods: {
    onTableBtn(row) {
      console.log(row)
    },
    handleEdit(index, row) {
      console.log(index, row)
    }
  }
}
</script>

<style scoped>

</style>
